package GameScript.center.service.imp;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import GameScript.center.dao.CardMapper;
import GameScript.center.entiy.Card;
import GameScript.center.service.MakeCardService;
@Service
public class MakeCardServiceImp implements MakeCardService {
@Autowired
CardMapper cardMapper;

	@Transactional
	public int insertAll(Card card) {
		// TODO Auto-generated method stub
		 try {
		
			 card.setCardNo(null);
			card.getCreateDate();
			 int k=1/0;
			 cardMapper.insert(card);
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
			 throw new RuntimeException("1111222xxxxxxxxxxxx"); 
		}
		 return 1;
	}
 
}
